//
//  RCTILVideo.h
//  IMIHome
//
//  Created by 严敏 on 2021/3/12.
//  Copyright © 2021 上海创米科技有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>
#include <AVFoundation/AVFoundation.h>
#import <AVKit/AVKit.h>
#import "ILVideoViewProtocol.h"
#import "ILPlayerProtocol.h"

NS_ASSUME_NONNULL_BEGIN

@interface ILVideoNetPlayer : NSObject
//添加代理
@property (nonatomic, weak) id<ILVideoViewProtocol> delegate;

@property(nonatomic, strong) AVPlayerViewController *playerViewController;
@property(nonatomic, strong) AVPlayer *player;

//属性
@property(nonatomic, strong, setter=setSrc:) NSDictionary *src;
/* For sending videoProgress events */
@property(nonatomic, assign, setter=setProgressUpdateInterval:) float progressUpdateInterval;
@property(nonatomic, assign, setter=setControls:) BOOL controls;

/* Keep track of any modifiers, need to be applied after each play */
@property(nonatomic, assign, setter=setVolume:) float volume;
@property(nonatomic, assign, setter=setRate:) float rate;
@property(nonatomic, assign, setter=setMuted:) BOOL muted;
@property(nonatomic, assign, setter=setPaused:) BOOL paused;
@property(nonatomic, assign, setter=setRepeat:) BOOL repeat;
@property(nonatomic, assign, setter=setPlayInBackground:) BOOL playInBackground;
@property(nonatomic, assign, setter=setPlayWhenInactive:) BOOL playWhenInactive;
@property(nonatomic, copy, setter=setIgnoreSilentSwitch:) NSString *ignoreSilentSwitch;
@property(nonatomic, copy, setter=setResizeMode:) NSString *resizeMode;
@property(nonatomic, assign, getter=getFullscreen, setter=setFullscreen:) BOOL fullscreen;
@property(nonatomic, assign, getter=getCurrentTime, setter=setCurrentTime:) float currentTime;
@property(nonatomic, assign, setter=setSeek:) NSDictionary *seek;

- (void)setSeek:(NSDictionary *)info;

- (void)destroy;
/*
@property(nonatomic, copy) RCTDirectEventBlock onVideoLoadStart;
@property(nonatomic, copy) RCTDirectEventBlock onVideoLoad;
@property(nonatomic, copy) RCTDirectEventBlock onVideoBuffer;
@property(nonatomic, copy) RCTDirectEventBlock onVideoError;
@property(nonatomic, copy) RCTDirectEventBlock onVideoProgress;
@property(nonatomic, copy) RCTDirectEventBlock onVideoSeek;
@property(nonatomic, copy) RCTDirectEventBlock onVideoEnd;
@property(nonatomic, copy) RCTDirectEventBlock onReadyForDisplay;
@property(nonatomic, copy) RCTDirectEventBlock onPlaybackStalled;
@property(nonatomic, copy) RCTDirectEventBlock onPlaybackResume;
@property(nonatomic, copy) RCTDirectEventBlock onPlaybackRateChange;
*/

@end

NS_ASSUME_NONNULL_END
